package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@RequestMapping("page")
@Controller
public class pageController {

    @RequestMapping("/{p}.html")
    private String LoginPage(@PathVariable String p, HttpServletRequest req){
        if(req.getSession().getAttribute("user")!=null)
        {
            return p;
        }
    return "login";
    }
}
